import Cookies from 'js-cookie'

const TokenKey = 'register-jwt-token'

/**
 * @description: 获取token
 * @author: zengxiaolong
 * @Date: 2023-02-23 18:32:21
 * @return {*}
 */
export function getToken() {
  return Cookies.get(TokenKey)
}

/**
 * @description: 设置token
 * @author: zengxiaolong
 * @Date: 2023-02-23 18:33:00
 * @param {*} token
 * @return {*}
 */
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

/**
 * @description: 移除token
 * @author: zengxiaolong
 * @Date: 2023-02-23 18:33:26
 * @return {*}
 */
export function removeToken() {
  return Cookies.remove(TokenKey)
}
